/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2022 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under BSD 3-Clause license,
  * the "License"; You may not use this file except in compliance with the
  * License. You may obtain a copy of the License at:
  *                        opensource.org/licenses/BSD-3-Clause
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#define LCD_Width  128
#define LCD_Height 160
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define RESET_NO_Pin GPIO_PIN_13
#define RESET_NO_GPIO_Port GPIOC
#define DB16_Pin GPIO_PIN_0
#define DB16_GPIO_Port GPIOC
#define DB17_Pin GPIO_PIN_1
#define DB17_GPIO_Port GPIOC
#define DB18_Pin GPIO_PIN_2
#define DB18_GPIO_Port GPIOC
#define DB19_Pin GPIO_PIN_3
#define DB19_GPIO_Port GPIOC
#define SPI1_CS_Pin GPIO_PIN_0
#define SPI1_CS_GPIO_Port GPIOA
#define SPI1_DCX_Pin GPIO_PIN_1
#define SPI1_DCX_GPIO_Port GPIOA
#define SPI1_MISO_Pin GPIO_PIN_2
#define SPI1_MISO_GPIO_Port GPIOA
#define SPI1_MOSI_Pin GPIO_PIN_3
#define SPI1_MOSI_GPIO_Port GPIOA
#define SPI1_SCL_Pin GPIO_PIN_4
#define SPI1_SCL_GPIO_Port GPIOA
#define PAUSE_PA5_Pin GPIO_PIN_5
#define PAUSE_PA5_GPIO_Port GPIOA
#define LCD_WR_Pin GPIO_PIN_6
#define LCD_WR_GPIO_Port GPIOA
#define LCD_RD_Pin GPIO_PIN_7
#define LCD_RD_GPIO_Port GPIOA
#define DB20_Pin GPIO_PIN_4
#define DB20_GPIO_Port GPIOC
#define DB21_Pin GPIO_PIN_5
#define DB21_GPIO_Port GPIOC
#define DB0_Pin GPIO_PIN_0
#define DB0_GPIO_Port GPIOB
#define DB1_Pin GPIO_PIN_1
#define DB1_GPIO_Port GPIOB
#define DB2_Pin GPIO_PIN_2
#define DB2_GPIO_Port GPIOB
#define DB10_Pin GPIO_PIN_10
#define DB10_GPIO_Port GPIOB
#define DB11_Pin GPIO_PIN_11
#define DB11_GPIO_Port GPIOB
#define DB12_Pin GPIO_PIN_12
#define DB12_GPIO_Port GPIOB
#define DB13_Pin GPIO_PIN_13
#define DB13_GPIO_Port GPIOB
#define DB14_Pin GPIO_PIN_14
#define DB14_GPIO_Port GPIOB
#define DB15_Pin GPIO_PIN_15
#define DB15_GPIO_Port GPIOB
#define DB22_Pin GPIO_PIN_6
#define DB22_GPIO_Port GPIOC
#define DB23_Pin GPIO_PIN_7
#define DB23_GPIO_Port GPIOC
#define LCD_RESET_Pin GPIO_PIN_8
#define LCD_RESET_GPIO_Port GPIOA
#define CTRL_VCC_Pin GPIO_PIN_15
#define CTRL_VCC_GPIO_Port GPIOA
#define DB3_Pin GPIO_PIN_3
#define DB3_GPIO_Port GPIOB
#define DB4_Pin GPIO_PIN_4
#define DB4_GPIO_Port GPIOB
#define DB5_Pin GPIO_PIN_5
#define DB5_GPIO_Port GPIOB
#define DB6_Pin GPIO_PIN_6
#define DB6_GPIO_Port GPIOB
#define DB7_Pin GPIO_PIN_7
#define DB7_GPIO_Port GPIOB
#define DB8_Pin GPIO_PIN_8
#define DB8_GPIO_Port GPIOB
#define DB9_Pin GPIO_PIN_9
#define DB9_GPIO_Port GPIOB
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
